$(function(){
var scontainer_li=document.querySelector(".wrap2 .list.list2 ul");
// console.log(scontainer_li)
$.ajax({
    url : "../iconfont/index.json"
})
.then(function( res ){
    randomrain1( res.datas2 );
})
function randomrain1(list){
    // console.log(list)
    scontainer_li.innerHTML=list.map(function(item){
        return `<li>
        <div class="contbox">
            <div class="itemname">
            ${item.itemname}
            </div>
            <div class="itemprice">
            <span class="price1">${item.price1}</span>
            <span class="price2">${item.price2}</span>
            </div>
            <div class="imgbox">
            <a javascript:void(0)>
                <img src=${item.img}>
            </a>
            </div>
        </div>
        </li>`
    }).join("")
}


var container_li=document.querySelector("#jingpin ul");
// console.log(container_li);
        $.ajax({
            url : "../iconfont/index.json"
        })
        .then(function( res ){
            randomrain( res.datas );
        })


function randomrain(list){
        // console.log(list);
        container_li.innerHTML=list.map(function(item){
            return `<li>
            <div class="contbox">
                <div class="itemname">
                ${item.itemname}
                </div>
                <div class="itemprice">
                <span class="price1">${item.price1}</span>
                <span class="price2">${item.price2}</span>
                </div>
                <div class="imgbox">
                <a javascript:void(0)>
                    <img src=${item.img}>
                </a>
                </div>
            </div>
            </li>`
        }).join("");
}

//横向轮播图渲染
var hcontainer_li=document.querySelector(".wrap1 .list .tempWrap ul");
// console.log(hcontainer_li);
        $.ajax({
            url : "../iconfont/index.json"
        })
        .then(function( res ){
            randomrain2( res.datas3 );
        })


function randomrain2(list){
        // console.log(list);
        hcontainer_li.innerHTML=list.map(function(item){
            return `<li>
            <div class="contbox">
                <div class="itemname">
                ${item.itemname}
                </div>
                <div class="itemprice">
                <span class="price1">${item.price1}</span>
                <span class="price2">${item.price2}</span>
                </div>
                <div class="imgbox">
                <a javascript:void(0)>
                    <img src=${item.img}>
                </a>
                </div>
            </div>
            </li>`
        }).join("");
}


//轮播图

    
 
    });

   

      
